package vista;

public class ComboItem {
	
    private String id;
    private String description;

    public ComboItem(){}
    
    public ComboItem(String id)
    {
        this.id = id;
        this.description = id;
    }
    
    public ComboItem(Integer id, String description)
    {
        this.id = id.toString();
        this.description = description;
    }
    
    public ComboItem(String id, String description)
    {
        this.id = id;
        this.description = description;
    }

    public String getId()
    {
        return id;
    }

    public String getDescription()
    {
        return description;
    }

    public String toString()
    {
        return description;
    }
    
    public boolean equals(Object obj)
	{
		if (obj != null && this.getClass().isInstance(obj)){
			ComboItem tmp = (ComboItem)obj;
			return id.equals(tmp.getId());
		}
		return false;
	}
}
